import request from '@/utils/requestAdmin'

// 获取用户列表
export function getUserList(params) {
  return request.get('/user/page', { params })
}

// 添加用户
export function addUser(data) {
  return request.post('/user/register', data)
}

// 更新用户信息
export function updateUser(data) {
  return request.put('/user/update', data)
}

// 删除用户
export function deleteUser(id) {
  return request.delete(`/user/delete/${id}`)
}

// 获取用户详情
export function getUserDetail(id) {
  return request.get(`/user/detail/${id}`)
}

// 模糊搜索用户
export function searchUser(params) {
  return request.get('/user/search', { params })
}
